package com.foton.springbootdemo.condition;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author RenPu
 * @Date 2023/3/24 11:07
 * @Version 1.0
 * @Description:
 **/

@Slf4j
@Configuration
public class TestCondition {

    @Bean
    @ConditionalOnClass(name = {"org.springframework.data.redis.core.RedisTemplate"})
    public Object test1(){
        log.info("项目中引入了，redis的依赖，我被执行了：：：：");
        return new Object();
    }


}
